package view;

import java.awt.Point;

import javax.swing.ImageIcon;

public class ImagePoint2D extends Point {

//	private double x;
//	private double y;
	
	private String name;
	private ImageIcon icon;
	
	public ImagePoint2D(int x_, int y_, ImageIcon icon_, String name_) {
		x = x_;
		y = y_;
		icon = icon_;
		name = name_;
	}
	
	public ImagePoint2D(int x_, int y_, ImageIcon icon_) {
		this(x_, y_, icon_, null);
	}
	
	public ImagePoint2D(Point pt, ImageIcon icon_) {
		this(pt.x, pt.y, icon_);
	}
	
	public ImagePoint2D(Point pt, ImageIcon icon_, String name_) {
		this(pt.x, pt.y, icon_, name_);
	}
	
	public ImageIcon getIcon() {
		return icon;
	}
	
	@Override
	public double getX() {
		return x;
	}

	@Override
	public double getY() {
		return y;
	}

	public boolean hasName() {
		return name != null;
	}
	
	public String getName() {
		return name;
	}
	
	public void setname(String name_) {
		name = name_;
	}
	
	public void setIcon(ImageIcon icon_) {
		icon = icon_;
	}
	
	@Override
	public void setLocation(int x_, int y_) {
		x = x_;
		y = y_;
	}

}
